import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useTabStore = defineStore('tab', () => {
  const activeName = ref('findGoods')
  const setActiveName = async (tabName) => {
    activeName.value = tabName;
  }
  const resetActiveName = () => {
    activeName.value = 'findGoods';
  }
  return {
    activeName,
    setActiveName,
    resetActiveName
  }
},
  {
    persist: true, //开启持久化存储
  });